trt_exe=/usr/src/tensorrt/bin/trtexec

onnx_path="/weights/chuwei_best_20240805.onnx"
trt_path="/weights/chuwei_best_20240805_fp16_b1.trt"

timingCacheFile=${trt_path}_tc.cache

# 其他可选参数
# --profilingVerbosity=detailed \
# --exportLayerInfo=${exportLayerInfo} \

$trt_exe \
    --onnx=$onnx_path \
    --saveEngine=$trt_path \
    --skipInference \
    --verbose \
    --minShapes=images:1x3x640x640 \
    --optShapes=images:1x3x640x640 \
    --maxShapes=images:1x3x640x640 \
    --timingCacheFile=${timingCacheFile} \
    --fp16 \
    > verbose.log
